<template>
  <div>
      <el-button type="info" @click="logout">退出</el-button>
  </div>
</template>

<script>
export default {
  name: "Home",
  data() {
    return {};
  },
  methods: {
      logout(){
          //清除token
          window.sessionStorage.clear();
          //转到登录页
          this.$router.push('/');
      }
  }
};
</script>

<style scoped>
</style>